*****************************************************************************
*       Figure Additional Context Stock Robot from Acemoglu & Restrepo      *
*																			*			
* Author: 			Valentina Gonzalez Rostani		        				*
* Contact: 			mag384@pitt.edu              							*
* Date: 			August 9 2024   										*
* Version:			Stata 17 												*                                                                          
*																			*
*****************************************************************************
/*
This do-file:
- Creates Figure A1 using data from Acemoglu & Restrepo. 

Input:
- Data\reproducingacemoglu.csv

Output:
- Figure A1: Stock of robots per thousand of workers base 1993 [Figures\number_robots.pdf]

*/

*Defining Directory
cd "C:\Users\vgonz\Dropbox\Pitt\OneDrive for Business\Dissertation - Vale\Paper 2 - Political-Economic Polarization\Replication" 
 
 import delimited "Data\reproducingacemoglu.csv", clear

 
 
******************************************************************************
* Graph setting
******************************************************************************
* Graph style 
{
grstyle clear
set scheme s2color
grstyle init
grstyle set plain, box
grstyle color background white
grstyle set color dknavy
grstyle yesno draw_major_hgrid yes
grstyle yesno draw_major_ygrid yes
grstyle color major_grid gs8
grstyle linepattern major_grid dot
grstyle color ci_area gs12%50
 graph set window fontface "Georgia"
}
 //Figure A1: Stock of robots per thousand of workers base 1993
 {
twoway ///
    (line germany year, lcolor(blue) lwidth(medium) lpattern(solid)) ///
    (line denmarkfinlandfranceitalyandswed year, lcolor(gs10) lwidth(medium) lpattern(longdash)) ///
    (line unitedstates year, lcolor(blue) lwidth(medium) lpattern(shortdash)) ///
    (line norwayspainanduk year, lcolor(blue) lwidth(medium) lpattern(dash_dot)), ///
    xtitle("Year") ytitle("Stock of robots per thousand of workers") ///
    legend(order(1 "Germany" 2 "Denmark, Finland, France, Italy and Sweden" 3 "United States" 4 "Norway, Spain, and UK") position(6) size(small)) ///
    yscale(range(0 6)) xscale(range(1993 2014)) legend(size(small))


graph export "Figure\number_robots.pdf", as(pdf) replace
}